<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<!DOCTYPE HTML>
<html>
  <head>
    <c:import url="_meta.jsp"></c:import>
    <c:import url="_link.jsp"></c:import>
    <title>添加景区</title>
  </head>
  
  <body>
    <article class="cl pd-20">
	  <form class="form form-horizontal" id="form-add">
	    <input type="hidden" name="scenicSpotId"/>
		<div class="row cl">
		  <label class="form-label col-xs-4 col-sm-3"><span class="c-red">*</span>景区名称：</label>
			<div class="formControls col-xs-8 col-sm-9">
			  <input type="text" class="input-text" placeholder="景区名称" name="scenicSpot" id="scenicSpot">
			</div>
		</div>
		<div class="row cl">
		  <label class="form-label col-xs-4 col-sm-3"><span class="c-red">*</span>景区地址：</label>
		  <div class="formControls col-xs-8 col-sm-9">
			<input type="text" class="input-text" placeholder="景区地址" name="address" id="address">
		  </div>
		</div>
		<div class="row cl">
		  <label class="form-label col-xs-4 col-sm-3"><span class="c-red">*</span>排序优先级：</label>
		  <div class="formControls col-xs-8 col-sm-9">
			<input type="text" class="input-text" placeholder="排序优先级，非重复数字，如1，2，3..." name="priorityLevel" id="priorityLevel">
		  </div>
		</div>
        <div class="row cl">
          <label class="form-label col-xs-4 col-sm-3"><span class="c-red">*</span>原票价：</label>
          <div class="formControls col-xs-8 col-sm-9">
            <input type="text" class="input-text" placeholder="原票价" name="price" id="price">
          </div>
        </div>
        <div class="row cl">
          <label class="form-label col-xs-4 col-sm-3"><span class="c-red">*</span>终端编号：</label>
          <div class="formControls col-xs-8 col-sm-9">
            <input type="text" class="input-text" placeholder="终端编号不允许重复" name="terminalNumber" id="terminalNumber">
          </div>
        </div>

        <div id="editor">
        </div>
        
        <input name="spotDetail" class="hide" id="spotDetail"/>

		<div class="row cl">
		  <div class="col-xs-8 col-sm-9 col-xs-offset-4 col-sm-offset-3">
		    <input class="btn btn-primary radius" id="fetch" type="button" value="修改详情" />
		    <input class="btn btn-primary radius" type="submit" value="&nbsp;&nbsp;提交&nbsp;&nbsp;">
		  </div>
		</div>
	  </form>
    </article>
    <c:import url="_footer.jsp"></c:import>
    <script type="text/javascript" src="${pageContext.request.contextPath}/resources/lib/datatables/1.10.0/jquery.dataTables.min.js"></script>
    <script type="text/javascript" src="${pageContext.request.contextPath}/resources/lib/laypage/1.2/laypage.js"></script>
    <script type="text/javascript" src="${pageContext.request.contextPath}/resources/lib/jquery.validation/1.14.0/jquery.validate.js"></script> 
    <script type="text/javascript" src="${pageContext.request.contextPath}/resources/lib/jquery.validation/1.14.0/validate-methods.js"></script> 
    <script type="text/javascript" src="${pageContext.request.contextPath}/resources/lib/jquery.validation/1.14.0/messages_zh.js"></script>
    <script>var contextPath = "${pageContext.request.contextPath}";</script>
    <script type="text/javascript" src="${pageContext.request.contextPath}/resources/js/formHandle.js"></script>
    <script type="text/javascript" src="${pageContext.request.contextPath}/resources/js/scenicSpot_add.js"></script>
    <script type="text/javascript" src="${pageContext.request.contextPath}/resources/lib/wangEditor-3.1.1/wangEditor.min.js"></script>
    <script type="text/javascript">
      var editor = new window.wangEditor('#editor');
       editor.customConfig.uploadImgShowBase64 = true;
       editor.customConfig.onchange = function (html) {
    	   $('#spotDetail').val(html)
    	 }
       editor.create();
        $('#fetch').click(function() {
        	editor.txt.html($('#spotDetail').val());
       });
    </script>
  </body>
</html>